package com.foreknow.elmboot.mapper;

import com.foreknow.elmboot.po.Food;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 最酷的桃儿wjc
 * * @date 2022/5/7
 */
@Mapper
public interface FoodMapper {
    /**
     * 根据商家编号查询所属食品信息
     * @param businessId
     * @return
     */
    @Select("select * from food where businessId=#{businessId}")
    public List<Food> listFoodByBusinessId(Integer businessId);

    /**
     * 根据食品id查询食品信息
     * @param foodId
     * @return
     */
    @Select("select * from food where foodId=#{foodId}")
    public Food getFoodById(Integer foodId);
}
